﻿<%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" 
CodeBehind="designshop_sitecata.aspx.cs" Inherits="map.member.designshop_sitecata" Title="网站导航栏" %>

 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../js/dhtmlwindow.js" type="text/javascript"></script>
<link href="../dhtmlwindow.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    var curcell;
    function openmypage(_curcell){ 
    curcell = _curcell;
    ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "editcell2.aspx", "选择数据源", "width=650px,height=400px,left=60px,top=80px,resize=1,scrolling=1")
    }

    String.prototype.replaceAll = function(reallyDo, replaceWith, ignoreCase) {
        if (!RegExp.prototype.isPrototypeOf(reallyDo)) {
            return this.replace(new RegExp(reallyDo, (ignoreCase ? "gi": "g")), replaceWith);
        } else {
            return this.replace(reallyDo, replaceWith);
        }
    }

    function confirmcell(_linkaddress){ 
        document.getElementById(curcell).innerHTML=_linkaddress ;
        var x = document.getElementById('ctl00_ContentPlaceHolder1_TextBox3').value;
        var y = document.getElementById('ctl00_ContentPlaceHolder1_TextBox4').value;
        var ret="";
        ret += '{[';
        for (i = 0; i < x; i++) 
        {        
            for (j = 0; j < y; j++) 
            {
                if (!(j==0 && i==0))
                {
                    ret += ',';
                }
                var tmphtml =document.getElementById('div'+i+"_"+j).innerHTML;
                tmphtml=tmphtml.replaceAll('"',"'",false);
    //            if (tmphtml == '')
    //                tmphtml = '"&nbsp;"';
                ret += '{div:'+'"'+i+"_"+j +":" 
                    +tmphtml+'"' + "}";
            }
        }
        ret += ']}';
        ajaxwin.close();
        AjaxFunction.setwzfl(ret);
    }

    function cancelcell(){ 
        ajaxwin.close();
    }
    function loaddata(){ 
        var result = AjaxFunction.getwzfl();
        if (result.value != null && result.value != "") {
            var allStates = eval(result.value);
                if (allStates.length > 0) {
                    for (var j = 0; j < allStates.length; j++) {
                        var divj = allStates[j].div;
                        var divid = divj.substring(0,divj.indexOf(":"));
                        var divhtml = divj.substring(divj.indexOf(":")+1);
                        if (document.getElementById("div"+divid) != null)
                        {
                            document.getElementById("div"+divid).innerHTML=divhtml;
                        }
                    }
                }
        }

    }

    // 获取编辑器中HTML内容  
    function getEditorHTMLContents(EditorName) {  
        var oEditor = FCKeditorAPI.GetInstance(EditorName);  
        return(oEditor.GetXHTML(true));  
    } 
    // 获取编辑器中文字内容  
    function getEditorTextContents(EditorName) {  
        var oEditor = FCKeditorAPI.GetInstance(EditorName);  
        return(oEditor.EditorDocument.body.innerText);  
    }  
      
    // 设置编辑器中内容  
    function SetEditorContents(EditorName, ContentStr) {  
        var oEditor = FCKeditorAPI.GetInstance(EditorName) ;  
        oEditor.SetHTML(ContentStr) ;  
    }  
</script>

    <link href="../outstyle.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        form div
        {
            margin-bottom: 5px;
            
        }
        .style1
        {
             z-index:0;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


高度:

    <asp:DropDownList ID="DropDownList_height" runat="server" AutoPostBack="True" 
        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
        <asp:ListItem  Selected="True">自动</asp:ListItem>
        <asp:ListItem>100%</asp:ListItem>
        <asp:ListItem>50</asp:ListItem>
        <asp:ListItem>60</asp:ListItem>
        <asp:ListItem>80</asp:ListItem>
        <asp:ListItem>100</asp:ListItem>
        <asp:ListItem>120</asp:ListItem>
        <asp:ListItem>150</asp:ListItem>
        <asp:ListItem>200</asp:ListItem>
        <asp:ListItem>300</asp:ListItem>
        <asp:ListItem>500</asp:ListItem>
    </asp:DropDownList>
宽度:    
    <asp:DropDownList ID="DropDownList_width" runat="server" AutoPostBack="True" 
        onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
        <asp:ListItem >自动</asp:ListItem>
        <asp:ListItem Selected="True">100%</asp:ListItem>
        <asp:ListItem>50</asp:ListItem>
        <asp:ListItem>60</asp:ListItem>
        <asp:ListItem>80</asp:ListItem>
        <asp:ListItem>100</asp:ListItem>
        <asp:ListItem>120</asp:ListItem>
        <asp:ListItem>150</asp:ListItem>
        <asp:ListItem>200</asp:ListItem>
        <asp:ListItem>300</asp:ListItem>
        <asp:ListItem>500</asp:ListItem>
    </asp:DropDownList>
 
                <br />
                行数:<asp:TextBox ID="TextBox3" runat="server">3</asp:TextBox> <br />
                列数:<asp:TextBox ID="TextBox4" runat="server">6</asp:TextBox> <br />


    <asp:Button ID="Button_save" runat="server" Text="保 存" 
        onclick="Button_save_Click"   />
        <asp:Button ID="Button1" runat="server" Text="预览效果" onclick="Button1_Click" />
        (注:实际效果不包括边框)<br />
        
        <asp:Literal ID="Literal1" runat="server"></asp:Literal>
<br />
<br />设置内容:
        <asp:Literal ID="Literal2" runat="server"></asp:Literal>
<br />

</asp:Content>

